home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
- Object = "{6B7E6392-850A-101B-AFC0-4210102A8DA7}#1.3#0"; "COMCTL32.OCX"
- Object = "{3DFCEC33-FE34-11D2-96FA-0080C88BFAE7}#1.0#0"; "Sheriff.dll"
- Begin VB.Form frmMain
- AutoRedraw = -1 'True
- Caption = "SlsDemoVB"
- ClientHeight = 2556
- ClientLeft = 132
- ClientTop = 588
- ClientWidth = 4848
- LinkTopic = "Form1"
- ScaleHeight = 2556
- ScaleWidth = 4848
- StartUpPosition = 3 'Windows Default
- Begin ComctlLib.Toolbar tbToolBar
- Align = 1 'Align Top
- Height = 336
- Left = 0
- TabIndex = 1
- Top = 0
- Width = 4848
- _ExtentX = 8551
- _ExtentY = 593
- Appearance = 1
- ImageList = "imlIcons"
- _Version = 327682
- BeginProperty Buttons {0713E452-850A-101B-AFC0-4210102A8DA7}
- NumButtons = 17
- BeginProperty Button1 {0713F354-850A-101B-AFC0-4210102A8DA7}
- Key = "New"
- Object.ToolTipText = "New"
- Object.Tag = ""
- ImageIndex = 1
- EndProperty
- BeginProperty Button2 {0713F354-850A-101B-AFC0-4210102A8DA7}
- Key = "Open"
- Object.ToolTipText = "Open"
- Object.Tag = ""
- ImageIndex = 2
- EndProperty
- BeginProperty Button3 {0713F354-850A-101B-AFC0-4210102A8DA7}
- Key = "Save"
- Object.ToolTipText = "Save"
- Object.Tag = ""
- ImageIndex = 3
- EndProperty
- BeginProperty Button4 {0713F354-850A-101B-AFC0-4210102A8DA7}
- Key = ""
- Object.Tag = ""
- Style = 3
- EndProperty
- BeginProperty Button5 {0713F354-850A-101B-AFC0-4210102A8DA7}
- Key = "Print"
- Object.ToolTipText = "Print"
- Object.Tag = ""
- ImageIndex = 4
- EndProperty
- BeginProperty Button6 {0713F354-850A-101B-AFC0-4210102A8DA7}
- Key = ""
- Object.Tag = ""
- Style = 3
- EndProperty
- BeginProperty Button7 {0713F354-850A-101B-AFC0-4210102A8DA7}
- Key = "Cut"
- Object.ToolTipText = "Cut"
- Object.Tag = ""
- ImageIndex = 5
- EndProperty
- BeginProperty Button8 {0713F354-850A-101B-AFC0-4210102A8DA7}
- Key = "Copy"
- Object.ToolTipText = "Copy"
- Object.Tag = ""
- ImageIndex = 6
- EndProperty
- BeginProperty Button9 {0713F354-850A-101B-AFC0-4210102A8DA7}
- Key = "Paste"
- Object.ToolTipText = "Paste"
- Object.Tag = ""
- ImageIndex = 7
- EndProperty
- BeginProperty Button10 {0713F354-850A-101B-AFC0-4210102A8DA7}
- Key = ""
- Object.Tag = ""
- Style = 3
- EndProperty
- BeginProperty Button11 {0713F354-850A-101B-AFC0-4210102A8DA7}
- Key = "Bold"
- Object.ToolTipText = "Bold"
- Object.Tag = ""
- ImageIndex = 8
- EndProperty
- BeginProperty Button12 {0713F354-850A-101B-AFC0-4210102A8DA7}
- Key = "Italic"
- Object.ToolTipText = "Italic"
- Object.Tag = ""
- ImageIndex = 9
- EndProperty
- BeginProperty Button13 {0713F354-850A-101B-AFC0-4210102A8DA7}
- Key = "Underline"
- Object.ToolTipText = "Underline"
- Object.Tag = ""
- ImageIndex = 10
- EndProperty
- BeginProperty Button14 {0713F354-850A-101B-AFC0-4210102A8DA7}
- Key = ""
- Object.Tag = ""
- Style = 3
- EndProperty
- BeginProperty Button15 {0713F354-850A-101B-AFC0-4210102A8DA7}
- Key = "Left"
- Object.ToolTipText = "Left Justify"
- Object.Tag = ""
- ImageIndex = 11
- Style = 2
- Value = -1
- EndProperty
- BeginProperty Button16 {0713F354-850A-101B-AFC0-4210102A8DA7}
- Key = "Center"
- Object.ToolTipText = "Center"
- Object.Tag = ""
- ImageIndex = 12
- Style = 2
- Value = -1
- EndProperty
- BeginProperty Button17 {0713F354-850A-101B-AFC0-4210102A8DA7}
- Key = "Right"
- Object.ToolTipText = "Right Justify"
- Object.Tag = ""
- ImageIndex = 13
- Style = 2
- Value = -1
- EndProperty
- EndProperty
- End
- Begin SHERIFFLibCtl.Sheriff Sheriff1
- Height = 972
- Left = 3120
- OleObjectBlob = "frmMain.frx":0000
- TabIndex = 2
- Top = 960
- Visible = 0 'False
- Width = 972
- End
- Begin ComctlLib.StatusBar sbStatusBar
- Align = 2 'Align Bottom
- Height = 264
- Left = 0
- TabIndex = 0
- Top = 2292
- Width = 4848
- _ExtentX = 8551
- _ExtentY = 466
- SimpleText = ""
- _Version = 327682
- BeginProperty Panels {0713E89E-850A-101B-AFC0-4210102A8DA7}
- NumPanels = 3
- BeginProperty Panel1 {0713E89F-850A-101B-AFC0-4210102A8DA7}
- AutoSize = 1
- Object.Width = 3027
- Text = "Status"
- TextSave = "Status"
- Key = ""
- Object.Tag = ""
- EndProperty
- BeginProperty Panel2 {0713E89F-850A-101B-AFC0-4210102A8DA7}
- Style = 6
- AutoSize = 2
- TextSave = "5/31/99"
- Key = ""
- Object.Tag = ""
- EndProperty
- BeginProperty Panel3 {0713E89F-850A-101B-AFC0-4210102A8DA7}
- Style = 5
- AutoSize = 2
- TextSave = "8:54 PM"
- Key = ""
- Object.Tag = ""
- EndProperty
- EndProperty
- End
- Begin MSComDlg.CommonDialog dlgCommonDialog
- Left = 1392
- Top = 1080
- _ExtentX = 677
- _ExtentY = 677
- _Version = 393216
- End
- Begin ComctlLib.ImageList imlIcons
- Left = 1392
- Top = 1080
- _ExtentX = 804
- _ExtentY = 804
- BackColor = -2147483643
- ImageWidth = 16
- ImageHeight = 16
- MaskColor = 12632256
- _Version = 327682
- BeginProperty Images {0713E8C2-850A-101B-AFC0-4210102A8DA7}
- NumListImages = 13
- BeginProperty ListImage1 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
- Picture = "frmMain.frx":026A
- Key = ""
- EndProperty
- BeginProperty ListImage2 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
- Picture = "frmMain.frx":05BC
- Key = ""
- EndProperty
- BeginProperty ListImage3 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
- Picture = "frmMain.frx":090E
- Key = ""
- EndProperty
- BeginProperty ListImage4 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
- Picture = "frmMain.frx":0C60
- Key = ""
- EndProperty
- BeginProperty ListImage5 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
- Picture = "frmMain.frx":0FB2
- Key = ""
- EndProperty
- BeginProperty ListImage6 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
- Picture = "frmMain.frx":1304
- Key = ""
- EndProperty
- BeginProperty ListImage7 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
- Picture = "frmMain.frx":1656
- Key = ""
- EndProperty
- BeginProperty ListImage8 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
- Picture = "frmMain.frx":19A8
- Key = ""
- EndProperty
- BeginProperty ListImage9 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
- Picture = "frmMain.frx":1CFA
- Key = ""
- EndProperty
- BeginProperty ListImage10 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
- Picture = "frmMain.frx":204C
- Key = ""
- EndProperty
- BeginProperty ListImage11 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
- Picture = "frmMain.frx":239E
- Key = ""
- EndProperty
- BeginProperty ListImage12 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
- Picture = "frmMain.frx":26F0
- Key = ""
- EndProperty
- BeginProperty ListImage13 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
- Picture = "frmMain.frx":2A42
- Key = ""
- EndProperty
- EndProperty
- End
- Begin VB.Menu mnuFile
- Caption = "&File"
- Begin VB.Menu mnuFileNew
- Caption = "&New"
- Shortcut = ^N
- End
- Begin VB.Menu mnuFileOpen
- Caption = "&Open"
- Shortcut = ^O
- End
- Begin VB.Menu mnuFileClose
- Caption = "&Close"
- End
- Begin VB.Menu mnuFileBar1
- Caption = "-"
- End
- Begin VB.Menu mnuFileSave
- Caption = "&Save"
- Shortcut = ^S
- End
- Begin VB.Menu mnuFileSaveAs
- Caption = "Save &As..."
- End
- Begin VB.Menu mnuFileSaveAll
- Caption = "Save A&ll"
- End
- Begin VB.Menu mnuFileBar2
- Caption = "-"
- End
- Begin VB.Menu mnuFileProperties
- Caption = "Propert&ies"
- End
- Begin VB.Menu mnuFileBar3
- Caption = "-"
- End
- Begin VB.Menu mnuFilePageSetup
- Caption = "Page Set&up..."
- End
- Begin VB.Menu mnuFilePrintPreview
- Caption = "Print Pre&view"
- End
- Begin VB.Menu mnuFilePrint
- Caption = "&Print..."
- Shortcut = ^P
- End
- Begin VB.Menu mnuFileBar4
- Caption = "-"
- End
- Begin VB.Menu mnuFileSend
- Caption = "Sen&d..."
- End
- Begin VB.Menu mnuFileBar5
- Caption = "-"
- End
- Begin VB.Menu mnuFileMRU
- Caption = ""
- Index = 0
- Visible = 0 'False
- End
- Begin VB.Menu mnuFileMRU
- Caption = ""
- Index = 1
- Visible = 0 'False
- End
- Begin VB.Menu mnuFileMRU
- Caption = ""
- Index = 2
- Visible = 0 'False
- End
- Begin VB.Menu mnuFileMRU
- Caption = ""
- Index = 3
- Visible = 0 'False
- End
- Begin VB.Menu mnuFileBar6
- Caption = "-"
- Visible = 0 'False
- End
- Begin VB.Menu mnuFileExit
- Caption = "E&xit"
- End
- End
- Begin VB.Menu mnuEdit
- Caption = "&Edit"
- Begin VB.Menu mnuEditUndo
- Caption = "&Undo"
- Shortcut = ^Z
- End
- Begin VB.Menu mnuEditBar1
- Caption = "-"
- End
- Begin VB.Menu mnuEditCut
- Caption = "Cu&t"
- Shortcut = ^X
- End
- Begin VB.Menu mnuEditCopy
- Caption = "&Copy"
- Shortcut = ^C
- End
- Begin VB.Menu mnuEditPaste
- Caption = "&Paste"
- Shortcut = ^V
- End
- Begin VB.Menu mnuEditPasteSpecial
- Caption = "Paste &Special..."
- End
- End
- Begin VB.Menu mnuView
- Caption = "&View"
- Begin VB.Menu mnuViewToolbar
- Caption = "&Toolbar"
- Checked = -1 'True
- End
- Begin VB.Menu mnuViewStatusBar
- Caption = "Status &Bar"
- Checked = -1 'True
- End
- Begin VB.Menu mnuViewBar2
- Caption = "-"
- End
- Begin VB.Menu mnuViewRefresh
- Caption = "&Refresh"
- End
- Begin VB.Menu mnuViewOptions
- Caption = "&Options..."
- End
- End
- Begin VB.Menu mnuHelp
- Caption = "&Help"
- Begin VB.Menu mnuHelpContents
- Caption = "&Contents"
- End
- Begin VB.Menu mnuHelpSearch
- Caption = "&Search For Help On..."
- End
- Begin VB.Menu mnuHelpBar1
- Caption = "-"
- End
- Begin VB.Menu mnuHelpAbout
- Caption = "&About SlsDemoVB..."
- End
- End
- Attribute VB_Name = "frmMain"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Private Declare Function OSWinHelp% Lib "user32" Alias "WinHelpA" (ByVal hwnd&, ByVal HelpFile$, ByVal wCommand%, dwData As Any)
- Private Sub mnuHelpAbout_Click()
- frmAbout.Show vbModal, Me
- End Sub
- Private Sub mnuViewOptions_Click()
- 'To Do
- MsgBox "Options Dialog Code goes here!"
- End Sub
- Private Sub mnuViewStatusBar_Click()
- If mnuViewStatusBar.Checked Then
- sbStatusBar.Visible = False
- mnuViewStatusBar.Checked = False
- Else
- sbStatusBar.Visible = True
- mnuViewStatusBar.Checked = True
- End If
- End Sub
- Private Sub mnuViewToolbar_Click()
- If mnuViewToolbar.Checked Then
- tbToolBar.Visible = False
- mnuViewToolbar.Checked = False
- Else
- tbToolBar.Visible = True
- mnuViewToolbar.Checked = True
- End If
- End Sub
- Private Sub Sheriff1_OnChallenge(ByVal ChallengingData As String, ByRef ChallengedData As String)
- 'we have to support challenge
- Dim Challenger As Object
- Set Challenger = CreateObject("Sheriff.Challenger")
- 'Initialize the Challenger with secret codes
- Challenger.Secret1 = "0763198532076621"
- Challenger.Secret2 = "1854207641987532"
- Challenger.Secret3 = "2482159326044927"
- Challenger.Secret4 = "3739062895179618"
- hr = Challenger.CreateChallenge(ChallengingData, ChallengedData)
- End Sub
- Private Sub Sheriff1_OnLicenceExpired()
- MsgBox "Licence Expired"
- 'take appropriate actions
- '...
- End Sub
- Private Sub Sheriff1_OnProductNotAuthorized()
- MsgBox "Product is not authorized"
- 'take appropriate actions
- '...
- End Sub
- Private Sub Sheriff1_OnStart()
- MsgBox "OnStart"
- hr = Sheriff1.QueryLicenceInfo()
- 'take appropriate actions
- '...
- End Sub
- Private Sub Sheriff1_OnTooManyUsers()
- MsgBox "There ate too many users"
- 'take appropriate actions
- '...
- End Sub
- Private Sub Sheriff1_OnTrial()
- MsgBox "You're now entering evaluation time"
- 'take appropriate actions
- '...
- End Sub
- Private Sub tbToolBar_ButtonClick(ByVal Button As ComctlLib.Button)
- Select Case Button.Key
- Case "New"
- mnuFileNew_Click
- Case "New"
- mnuFileNew_Click
- Case "Open"
- mnuFileOpen_Click
- Case "Save"
- mnuFileSave_Click
- Case "Print"
- mnuFilePrint_Click
- Case "Cut"
- mnuEditCut_Click
- Case "Copy"
- mnuEditCopy_Click
- Case "Paste"
- mnuEditPaste_Click
- Case "Bold"
- 'To Do
- MsgBox "Bold Code goes here!"
- Case "Italic"
- 'To Do
- MsgBox "Italic Code goes here!"
- Case "Underline"
- 'To Do
- MsgBox "Underline Code goes here!"
- Case "Left"
- 'To Do
- MsgBox "Left Code goes here!"
- Case "Center"
- 'To Do
- MsgBox "Center Code goes here!"
- Case "Right"
- 'To Do
- MsgBox "Right Code goes here!"
- End Select
- End Sub
- Private Sub mnuHelpContents_Click()
- Dim nRet As Integer
- 'if there is no helpfile for this project display a message to the user
- 'you can set the HelpFile for your application in the
- 'Project Properties dialog
- If Len(App.HelpFile) = 0 Then
- MsgBox "Unable to display Help Contents. There is no Help associated with this project.", vbInformation, Me.Caption
- Else
- On Error Resume Next
- nRet = OSWinHelp(Me.hwnd, App.HelpFile, 3, 0)
- If Err Then
- MsgBox Err.Description
- End If
- End If
- End Sub
- Private Sub mnuHelpSearch_Click()
- Dim nRet As Integer
- 'if there is no helpfile for this project display a message to the user
- 'you can set the HelpFile for your application in the
- 'Project Properties dialog
- If Len(App.HelpFile) = 0 Then
- MsgBox "Unable to display Help Contents. There is no Help associated with this project.", vbInformation, Me.Caption
- Else
- On Error Resume Next
- nRet = OSWinHelp(Me.hwnd, App.HelpFile, 261, 0)
- If Err Then
- MsgBox Err.Description
- End If
- End If
- End Sub
- Private Sub mnuViewRefresh_Click()
- 'To Do
- MsgBox "Refresh Code goes here!"
- End Sub
- Private Sub mnuEditCopy_Click()
- 'To Do
- MsgBox "Copy Code goes here!"
- End Sub
- Private Sub mnuEditCut_Click()
- 'To Do
- MsgBox "Cut Code goes here!"
- End Sub
- Private Sub mnuEditPaste_Click()
- 'To Do
- MsgBox "Paste Code goes here!"
- End Sub
- Private Sub mnuEditPasteSpecial_Click()
- 'To Do
- MsgBox "Paste Special Code goes here!"
- End Sub
- Private Sub mnuEditUndo_Click()
- 'To Do
- MsgBox "Undo Code goes here!"
- End Sub
- Private Sub mnuFileOpen_Click()
- Dim sFile As String
- With dlgCommonDialog
- 'To Do
- 'set the flags and attributes of the
- 'common dialog control
- .Filter = "All Files (*.*)|*.*"
- .ShowOpen
- If Len(.FileName) = 0 Then
- Exit Sub
- End If
- sFile = .FileName
- End With
- 'To Do
- 'process the opened file
- End Sub
- Private Sub mnuFileClose_Click()
- 'To Do
- MsgBox "Close Code goes here!"
- End Sub
- Private Sub mnuFileSave_Click()
- 'To Do
- MsgBox "Save Code goes here!"
- End Sub
- Private Sub mnuFileSaveAs_Click()
- 'To Do
- 'Setup the common dialog control
- 'prior to calling ShowSave
- dlgCommonDialog.ShowSave
- End Sub
- Private Sub mnuFileSaveAll_Click()
- 'To Do
- MsgBox "Save All Code goes here!"
- End Sub
- Private Sub mnuFileProperties_Click()
- 'To Do
- MsgBox "Properties Code goes here!"
- End Sub
- Private Sub mnuFilePageSetup_Click()
- dlgCommonDialog.ShowPrinter
- End Sub
- Private Sub mnuFilePrintPreview_Click()
- 'To Do
- MsgBox "Print Preview Code goes here!"
- End Sub
- Private Sub mnuFilePrint_Click()
- 'To Do
- MsgBox "Print Code goes here!"
- End Sub
- Private Sub mnuFileSend_Click()
- 'To Do
- MsgBox "Send Code goes here!"
- End Sub
- Private Sub mnuFileMRU_Click(Index As Integer)
- 'To Do
- MsgBox "MRU Code goes here!"
- End Sub
- Private Sub mnuFileExit_Click()
- 'unload the form
- Unload Me
- End Sub
- Private Sub mnuFileNew_Click()
- 'To Do
- MsgBox "New File Code goes here!"
- End Sub
- Private Sub Form_Load()
- Sheriff1.CheckLicence
- End Sub
- Private Sub Sheriff1_OnError(ByVal lErrorCode As Long, ByVal bstrErrorMsg As String)
- MsgBox bstrErrorMsg
- End Sub
- Private Sub Sheriff1_OnHeartBeat()
- MsgBox "OnHeartbeat"
- End Sub
- Private Sub Sheriff1_OnProductNotLicensed()
- MsgBox "OnProductNotLicensed"
- End Sub
-